import request from '@/utils/request';
import { API_VERSION } from '@/utils';

// 数据统计 - 卷
export const getSingleSurveyStatistic = params => request({
  url: `/${API_VERSION}/answer/proportion/form/${params.questionnaireFormId}`,
  method: 'get',
  params
});

// 数据统计 - 项 - 定时重复
export const getCycleSurveyStatistic = params => request({
  url: `/${API_VERSION}/answer/proportion/item/${params.questionItemId}`,
  method: 'get'
});

// 数据统计 - 教学评估
export const getAssessmentSurveyStatistic = data => request({
  url: `/${API_VERSION}/assessment/assessment/statistics`,
  method: 'post',
  data
});

// 填写情况列表
export const getAnswerList = data => request({
  url: `/${API_VERSION}/answer/page`,
  method: 'post',
  data
});

// 平均分
export const getAvg = data => request({
  url: `/${API_VERSION}/answer/avg`,
  method: 'post',
  data
});

// 问卷FieldData
export const getFieldData = data => request({
  url: `/${API_VERSION}/questionnaireForm/fieldData`,
  method: 'post',
  data
});